package com.infore.siteManagement.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.infore.siteManagement.entity.otherEntity.Customtree;
import java.lang.String;
import java.util.List;
/**
 * 自定义站点树仓库
 * @author 刘乐法
 *
 *
 */
@Repository
public interface ICustomRespository extends JpaRepository<Customtree, String>,JpaSpecificationExecutor<Customtree>{

	List<Customtree> findByCustomtreeUserid(String customtreeuserid);
	
	@Modifying
	@Transactional
	List<Customtree> findByCustomtreeUseridAndCustomtreeGroupname(String userid, String name);
	
	@Modifying
	@Transactional
	int deleteByCustomtreeUseridAndCustomtreeGroupname(String userid, String name);
	
	Customtree findOneByCustomtreeUseridAndCustomtreeGroupname(String userid, String name);
	
	//List<Customtree> findAllByCustomtreeUseridAndStationsIn(String customtreeuserid,List<Station> stations);
}
